-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify sprintf
translation for percentage widths
#68587
Simplify sprintf
translation for percentage widths
#68587
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Hey @t-hamano , When you have a moment, could you please review my PR? I'd appreciate your feedback. I’m not sure why the linting checks for JavaScript are failing. The changes I made didn’t raise any linting errors during development. |
@im3dabasia, rebasing should fix the failing Static Analysis check. |
fbe92d3
to
9a9fdf7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Nice follow-up 👍
…ss#68587) Co-authored-by: im3dabasia <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]>
Related comment: #68270 (comment)
Related issues: #52787 , #66323 (review)
What?
This PR refines the code quality by simplifying the translation of percentage widths.
Why?
The previous implementation used
__( '%1$d%%' )
due to an ESLint error being flagged when using the simpler__( '%d%%' )
. Now that thesprintf
regex has been updated, this simplification is possible without causing issues. The change ensures consistency across the codebase and improves readability.How?
Replaced
__( '%1$d%%' )
with__( '%d%%' )
for percentage translations.